package xq.swing.text;

import javax.swing.JFrame;
import javax.swing.JTextPane;
import javax.swing.text.DefaultStyledDocument;
import javax.swing.text.EditorKit;
import javax.swing.text.StyledEditorKit;

/**
 *
 * @author ThorntonRP
 */
public class EditorPrototype {

	public static void main(String[] args) {
		JFrame f = new JFrame();
		f.add(new JTextPane(new MyStyledDocument()));
		f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		f.setSize(800, 600);
		f.setLocationRelativeTo(null);
		f.setVisible(true);
	}
}


class MyTextPane extends JTextPane {

	private static final long serialVersionUID = 1L;

	@Override
	protected EditorKit createDefaultEditorKit() {
		return new MyEditorKit();
	}
}
class MyStyledDocument extends DefaultStyledDocument {

	private static final long serialVersionUID = 1L;
}

class MyEditorKit extends StyledEditorKit {

	private static final long serialVersionUID = 1L;
}